package com.example.kt_base.s5

//TODO 95.Kotlin语言的运算符重载
class AddClss(number1:Int,number2:Int)
data class AddClss2(var number1:Int,var number2:Int){
    operator fun plus(p1:AddClss2):Int{
        return (number1+p1.number1)+(number2+p1.number2)
    }
}
fun main() {

    val num=AddClss2(1,1)+AddClss2(2,2)
    println(num)

}
